/* eslint-disable */
const User = require('../model/user/user');
const {operation} = require('../exam');


const checkStatus = async (ctx, next) => {
    let { username } = ctx.request.body;
    let res = await operation(`select status from users where username='${username}'`);
    if (res.status) {
        ctx.body = {
            msg: '该用户已禁用',
            code: '400'
        };
    } else {
        await next();
    }
};
module.exports = {
    checkStatus
};